package com.gs.mybatismptest.controller;


import com.gs.mybatismptest.service.UserService;
import com.gs.mybatismptest.vo.UserVo;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Path;
import org.noear.solon.core.handle.Result;

@Controller
@Mapping("/user")
public class UserController {

    @Inject
    private UserService userService;


    @Mapping("/getInfo/{id}")
    public Result   getUserInfo1(@Path("id") String id){
        UserVo userVo = userService.queryByUserId(id);

        return Result.succeed(userVo,"查询用户信息成功！");
    }



}
